<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
    <namespaces>
        <Namespace>
            <prefix>st</prefix>
            <uri>http://www.stations.org/1.0</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink</uri>
        </Namespace>
    </namespaces>
    <sourceDataStores>
        <DataStore>
            <id>stations</id>
            <parameters>
                <Parameter>
                    <name>directory</name>
                    <value>file:./</value>
                </Parameter>
            </parameters>
        </DataStore>
    </sourceDataStores>
    <targetTypes>
        <FeatureType>
            <schemaUri>stations.xsd</schemaUri>
        </FeatureType>
    </targetTypes>
    <includedTypes>
        <Include>institutes.xml</Include>
        <Include>persons.xml</Include>
    </includedTypes>
    <typeMappings>
        <FeatureTypeMapping>
            <sourceDataStore>stations</sourceDataStore>
            <sourceType>stations</sourceType>
            <targetElement>st:Station</targetElement>
            <attributeMappings>
                <AttributeMapping>
                    <targetAttribute>st:Station</targetAttribute>
                    <idExpression>
                        <OCQL>ID</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>st:Station/st:name</targetAttribute>
                    <sourceExpression>
                        <OCQL>NAME</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>st:Station/st:location</targetAttribute>
                    <sourceExpression>
                        <OCQL>LOCATION</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>st:Station/st:meta/st:institutes</targetAttribute>
                    <sourceExpression>
                        <OCQL>ID</OCQL>
                        <linkElement>st:Institute</linkElement>
                        <linkField>FEATURE_LINK[1]</linkField>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>st:Station/st:meta/st:institutes</targetAttribute>
                    <sourceExpression>
                        <OCQL>ID</OCQL>
                        <linkElement>st:Institute</linkElement>
                        <linkField>FEATURE_LINK[3]</linkField>
                    </sourceExpression>
                </AttributeMapping>
            </attributeMappings>
        </FeatureTypeMapping>
    </typeMappings>
</as:AppSchemaDataAccess>